<div ng-if="displayTime" class="time">{{::message.timestamp | date:'MM-dd HH:mm'}}</div>
<div class="message" ng-if="::message.id" ng-class="::{mine: isMine, mentioned: message.mentioned}" layout="column">
    <div class="user" ng-if="displayClientId" ng-click="onNameClick()">{{ ::message.from }}</div>
    <div ng-if="::message.type === RecalledMessage.TYPE" class="action-message">
        该消息已撤回
    </div>
    <div ng-if="::message.type !== RecalledMessage.TYPE" layout layout-align="start">
        <div layout="column" layout-align="space-between start">
            <div class="operations">
                <md-button class="md-icon-button"
                    ng-if="::isMine"
                    aria-label="Recall"
                    ng-click="onRecallClick()">
                    <md-icon>delete</md-icon>
                </md-button>
            </div>
            <div layout layout-align="start end">
                <span class="tips" title="{{groupReadClients}}" ng-if="groupReadClients">{{ groupReadHint }}</span>
                <span class="tips" ng-if="isLastDelivered ">已送达</span>
                <span class="tips" ng-if="isLastRead">已读</span>
                <md-icon ng-if="message.status === MessageStatus.SENDING">reply</md-icon>
                <md-icon ng-if="message.status === MessageStatus.FAILED">error</md-icon>
            </div>
        </div>
        <div class="image" ng-if="::message.type === ImageMessage.TYPE">
            <a ng-href="{{ ::message.getFile().url() }}" target="_blank">
                <img ng-src="{{ ::message.getFile().thumbnailURL(260, 360) }}"/>
            </a>
        </div>
        <div class="sticker" ng-if="::message.type === StickerMessage.TYPE">
            <img ng-src="{{::stickers[message.group][message.sticker]}}" alt="{{::message.sticker}}" width="100"/>
        </div>
        <div class="content" ng-if="::message.text">{{ ::message.text }}</div>
    </div>
</div>

<div ng-if="::!message.id" class="message" layout layout-align="center"><div class="action-message">{{ message.text }}</div></div>